package com.scholarship.modules.admin.dto;

import com.scholarship.modules.admin.entity.RewardApplication;
import com.scholarship.modules.admin.entity.RewardTypeDetail;
import com.scholarship.modules.admin.entity.TableInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 *
 * @Author Z.J.H
 * @create 2021/8/18 20:36
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RewardTypeDetailDto extends RewardTypeDetail {
    private Integer state;  //当前状态
    private Double grade;   //预估分数
    private String value;   //上传文件地址
    private String feedback;    //教师反馈
    private List<TableInfoDto> tableInfoListDto;

    public void addRewardApplication(RewardApplication rewardApplication) {
        this.state = rewardApplication.getState();
        this.grade = rewardApplication.getScore();
        this.value = rewardApplication.getFilePath();
        this.feedback = rewardApplication.getFeedback();
    }
}
